package controller;

import joptsimple.internal.Strings;

import java.util.concurrent.*;

public class 异步编排 {


    public static void main(String[] args) {




        final ExecutorService executorService = Executors.newFixedThreadPool(100);

        CompletableFuture.runAsync(()->{
            //子任务的业务
            try {
                TimeUnit.SECONDS.sleep(3);
                System.out.println(Thread.currentThread().getName());
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        },executorService);

        //主任务
        System.out.println("main end");
    }


}
